
import Cocoa

class ManageWallpapersWindowController: NSWindowController {

    convenience init() {
        let viewController = ManageWallpapersViewController()
        let window = NSWindow(contentViewController: viewController)
        window.title = "壁纸管理"
        window.styleMask = [.titled, .closable]
        self.init(window: window)
    }

    override func showWindow(_ sender: Any?) {
        // Bring window to front
        window?.makeKeyAndOrderFront(sender)
        // Ensure the app is active to see the window
        NSApp.activate(ignoringOtherApps: true)
    }
}
